home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / esdfeduc / frmmore.fr_ / frmmore.fr (.txt)
Encoding:
Visual Basic Form  |  1997-12-05  |  10.6 KB  |  315 lines

  1. VERSION 5.00
  2. Object = "{EB554505-3E59-11D1-9EE4-444553540000}#3.0#0"; "Esdf.ocx"
  3. Begin VB.Form frmMore 
  4.    BackColor       =   &H0080FFFF&
  5.    Caption         =   "More for a programmer"
  6.    ClientHeight    =   4875
  7.    ClientLeft      =   1140
  8.    ClientTop       =   1755
  9.    ClientWidth     =   8115
  10.    LinkTopic       =   "Form2"
  11.    ScaleHeight     =   4875
  12.    ScaleWidth      =   8115
  13.    Begin VB.TextBox txtSearch 
  14.       Height          =   285
  15.       Left            =   4440
  16.       TabIndex        =   11
  17.       Text            =   "Type ID for search here"
  18.       Top             =   120
  19.       Width           =   2055
  20.    End
  21.    Begin VB.CommandButton cmdSearch 
  22.       Caption         =   "FindFirst Publisher"
  23.       Height          =   375
  24.       Left            =   4440
  25.       TabIndex        =   10
  26.       Top             =   360
  27.       Width           =   2055
  28.    End
  29.    Begin ESDF.ColumnEdit ColumnEdit4 
  30.       Height          =   375
  31.       Left            =   3960
  32.       TabIndex        =   8
  33.       Top             =   2760
  34.       Width           =   2535
  35.       _ExtentX        =   4471
  36.       _ExtentY        =   661
  37.       DataTable       =   "Table1"
  38.       DataField       =   "Telephone"
  39.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  40.          Name            =   "Courier New"
  41.          Size            =   9.75
  42.          Charset         =   0
  43.          Weight          =   400
  44.          Underline       =   0   'False
  45.          Italic          =   0   'False
  46.          Strikethrough   =   0   'False
  47.       EndProperty
  48.    End
  49.    Begin ESDF.ColumnEdit ColumnEdit3 
  50.       Height          =   375
  51.       Left            =   3960
  52.       TabIndex        =   7
  53.       Top             =   2280
  54.       Width           =   2535
  55.       _ExtentX        =   4471
  56.       _ExtentY        =   661
  57.       DataTable       =   "Table1"
  58.       DataField       =   "City"
  59.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  60.          Name            =   "Courier New"
  61.          Size            =   9.75
  62.          Charset         =   0
  63.          Weight          =   400
  64.          Underline       =   0   'False
  65.          Italic          =   0   'False
  66.          Strikethrough   =   0   'False
  67.       EndProperty
  68.    End
  69.    Begin ESDF.ColumnEdit ColumnEdit2 
  70.       Height          =   375
  71.       Left            =   3960
  72.       TabIndex        =   6
  73.       Top             =   1800
  74.       Width           =   2535
  75.       _ExtentX        =   4471
  76.       _ExtentY        =   661
  77.       DataTable       =   "Table1"
  78.       DataField       =   "Address"
  79.       BrowseColWidth  =   20
  80.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  81.          Name            =   "Courier New"
  82.          Size            =   9.75
  83.          Charset         =   0
  84.          Weight          =   400
  85.          Underline       =   0   'False
  86.          Italic          =   0   'False
  87.          Strikethrough   =   0   'False
  88.       EndProperty
  89.    End
  90.    Begin ESDF.ColumnNoEdit ColumnNoEdit1 
  91.       Height          =   375
  92.       Left            =   0
  93.       TabIndex        =   3
  94.       Top             =   4560
  95.       Visible         =   0   'False
  96.       Width           =   2535
  97.       _ExtentX        =   4471
  98.       _ExtentY        =   661
  99.       DataTable       =   "Table2"
  100.       Browsed         =   -1  'True
  101.       DataField       =   "Title"
  102.       BrowseColWidth  =   80
  103.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  104.          Name            =   "Courier New"
  105.          Size            =   9.75
  106.          Charset         =   0
  107.          Weight          =   400
  108.          Underline       =   0   'False
  109.          Italic          =   0   'False
  110.          Strikethrough   =   0   'False
  111.       EndProperty
  112.    End
  113.    Begin ESDF.ColumnAutoID ColumnAutoID1 
  114.       Height          =   375
  115.       Left            =   0
  116.       TabIndex        =   1
  117.       Top             =   3000
  118.       Visible         =   0   'False
  119.       Width           =   615
  120.       _ExtentX        =   1085
  121.       _ExtentY        =   661
  122.       DataTable       =   "Table1"
  123.       Browsed         =   -1  'True
  124.       DataField       =   "PubID"
  125.       BrowseColWidth  =   4
  126.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  127.          Name            =   "Courier New"
  128.          Size            =   9.75
  129.          Charset         =   0
  130.          Weight          =   400
  131.          Underline       =   0   'False
  132.          Italic          =   0   'False
  133.          Strikethrough   =   0   'False
  134.       EndProperty
  135.    End
  136.    Begin ESDF.ColumnEdit ColumnEdit1 
  137.       Height          =   375
  138.       Left            =   3960
  139.       TabIndex        =   2
  140.       Top             =   1320
  141.       Width           =   2535
  142.       _ExtentX        =   4471
  143.       _ExtentY        =   661
  144.       DataTable       =   "Table1"
  145.       Browsed         =   -1  'True
  146.       DataField       =   "Name"
  147.       BrowseColWidth  =   20
  148.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  149.          Name            =   "Courier New"
  150.          Size            =   9.75
  151.          Charset         =   0
  152.          Weight          =   400
  153.          Underline       =   0   'False
  154.          Italic          =   0   'False
  155.          Strikethrough   =   0   'False
  156.       EndProperty
  157.    End
  158.    Begin ESDF.ControlBar ControlBar1 
  159.       Height          =   3975
  160.       Left            =   6720
  161.       TabIndex        =   0
  162.       Top             =   120
  163.       Width           =   1200
  164.       _ExtentX        =   2117
  165.       _ExtentY        =   7011
  166.    End
  167.    Begin ESDF.Table Table2 
  168.       Height          =   1290
  169.       Left            =   120
  170.       TabIndex        =   12
  171.       Top             =   3480
  172.       Width           =   6495
  173.       _ExtentX        =   11456
  174.       _ExtentY        =   2275
  175.       DatabaseName    =   "C:\PROJCT32\ESDF\SAMPLES\Basic.mdb"
  176.       RecordSource    =   "Titles"
  177.       EnableAdd       =   0   'False
  178.       EnableEdit      =   0   'False
  179.       EnableDel       =   0   'False
  180.       EnableRecall    =   0   'False
  181.       EnableErase     =   0   'False
  182.       ControlBar      =   "ControlBar1"
  183.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  184.          Name            =   "Courier New"
  185.          Size            =   8.25
  186.          Charset         =   0
  187.          Weight          =   400
  188.          Underline       =   0   'False
  189.          Italic          =   0   'False
  190.          Strikethrough   =   0   'False
  191.       EndProperty
  192.    End
  193.    Begin ESDF.Table Table1 
  194.       Height          =   1710
  195.       Left            =   120
  196.       TabIndex        =   13
  197.       Top             =   1320
  198.       Width           =   3735
  199.       _ExtentX        =   6588
  200.       _ExtentY        =   3016
  201.       ColorInactive   =   12632256
  202.       DatabaseName    =   "C:\PROJCT32\ESDF\SAMPLES\Basic.mdb"
  203.       RecordSource    =   "Publishers"
  204.       EnableAdd       =   0   'False
  205.       ControlBar      =   "ControlBar1"
  206.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  207.          Name            =   "Courier New"
  208.          Size            =   8.25
  209.          Charset         =   0
  210.          Weight          =   400
  211.          Underline       =   0   'False
  212.          Italic          =   0   'False
  213.          Strikethrough   =   0   'False
  214.       EndProperty
  215.    End
  216.    Begin VB.Label Label3 
  217.       BackStyle       =   0  'Transparent
  218.       Caption         =   "One-to-many relations, sorting, filtering, search:"
  219.       BeginProperty Font 
  220.          Name            =   "MS Sans Serif"
  221.          Size            =   12
  222.          Charset         =   0
  223.          Weight          =   400
  224.          Underline       =   0   'False
  225.          Italic          =   0   'False
  226.          Strikethrough   =   0   'False
  227.       EndProperty
  228.       ForeColor       =   &H000000FF&
  229.       Height          =   615
  230.       Left            =   120
  231.       TabIndex        =   14
  232.       Top             =   0
  233.       Width           =   3975
  234.    End
  235.    Begin VB.Label Label2 
  236.       AutoSize        =   -1  'True
  237.       BackStyle       =   0  'Transparent
  238.       Caption         =   "Only 6 lines of code inside!!!"
  239.       BeginProperty Font 
  240.          Name            =   "MS Sans Serif"
  241.          Size            =   13.5
  242.          Charset         =   0
  243.          Weight          =   700
  244.          Underline       =   0   'False
  245.          Italic          =   0   'False
  246.          Strikethrough   =   0   'False
  247.       EndProperty
  248.       ForeColor       =   &H000000FF&
  249.       Height          =   360
  250.       Left            =   120
  251.       TabIndex        =   9
  252.       Top             =   600
  253.       Width           =   4005
  254.    End
  255.    Begin VB.Label Label1 
  256.       BackStyle       =   0  'Transparent
  257.       Caption         =   "has published"
  258.       BeginProperty Font 
  259.          Name            =   "MS Sans Serif"
  260.          Size            =   12
  261.          Charset         =   0
  262.          Weight          =   400
  263.          Underline       =   0   'False
  264.          Italic          =   0   'False
  265.          Strikethrough   =   0   'False
  266.       EndProperty
  267.       Height          =   255
  268.       Index           =   1
  269.       Left            =   720
  270.       TabIndex        =   5
  271.       Top             =   3120
  272.       Width           =   1695
  273.    End
  274.    Begin VB.Label Label1 
  275.       BackStyle       =   0  'Transparent
  276.       Caption         =   "Publisher"
  277.       BeginProperty Font 
  278.          Name            =   "MS Sans Serif"
  279.          Size            =   12
  280.          Charset         =   0
  281.          Weight          =   400
  282.          Underline       =   0   'False
  283.          Italic          =   0   'False
  284.          Strikethrough   =   0   'False
  285.       EndProperty
  286.       Height          =   255
  287.       Index           =   0
  288.       Left            =   840
  289.       TabIndex        =   4
  290.       Top             =   960
  291.       Width           =   1695
  292.    End
  293. Attribute VB_Name = "frmMore"
  294. Attribute VB_GlobalNameSpace = False
  295. Attribute VB_Creatable = False
  296. Attribute VB_PredeclaredId = True
  297. Attribute VB_Exposed = False
  298. Private Sub cmdSearch_Click()
  299. 'Table control is automatically aware about changes in current record of .Recordset
  300. 'Be careful with this feature ture when the Table is in ADD or EDIT modes
  301.     Table1.Recordset.FindFirst "PubId = " & txtSearch
  302. 'If you delete, add update records directly through .Recordset,
  303. 'use .Refresh method to make the Table aware about.
  304. End Sub
  305. Private Sub Table1_TableInitData()
  306.     Table1.AddOrder "[unsorted]", ""
  307.     Table1.AddOrder "ID", "PubID"
  308.     Table1.AddOrder "Name", "Name"
  309. End Sub
  310. Private Sub Table1_TableReposition()
  311.     Table2.RecordSource = "SELECT * FROM Titles WHERE Pubid=" _
  312.         + CStr(Table1.Recordset.fields("Pubid"))
  313.     Table2.Refresh
  314. End Sub
  315.